﻿using System;
using Microsoft.Practices.Prism.Logging;
using System.Diagnostics;

namespace Gwn.Library.MvpVm.Loggers
{
    /// <summary>
    /// Sends logging information to debug output
    /// </summary>
    public class DebugLogger : ILoggerFacade
    {

        /// <summary>
        /// Write a new log entry with the specified category and priority.
        /// </summary>
        /// <param name="message">Message body to log.</param>
        /// <param name="category">Category of the entry.</param>
        /// <param name="priority">The priority of the entry.</param>
        public void Log(string message, Category category, Priority priority)
        {
            Debug.WriteLine(string.Format(
                "GWN:{0} {1}({2}) {3}",
                DateTime.Now.ToLongTimeString(),
                category,
                priority,
                message ));
        }
    }
}
